#ifndef __TASK__NVS_H__
#define __TASK__NVS_H__

#include "task_public.h"

#define NVS_KEY_STR_WIFI_SSID		"WIFI_SSID"
#define NVS_KEY_STR_WIFI_PWD		"WIFI_PWD"

#define NVS_KEY_U16_BUTTON_UP		"BU_VAL"
#define NVS_KEY_U16_BUTTON_DOWN		"BD_VAL"
#define NVS_KEY_U16_BUTTON_LEFT		"BL_VAL"
#define NVS_KEY_U16_BUTTON_RIGHT	"BR_VAL"
#define NVS_KEY_U16_BUTTON_CENTER	"BC_VAL"

#define NVS_KEY_STR_LOCAL_NAME		"HOSTNAME"

#define NVS_KEY_STR_SERVER_IP		"SEVERIP"
#define NVS_KEY_STR_SERVER_PORT		"SEVERPORT"

#define NVS_KEY_U8_OLED_BL			"OLED_BL"
#define NVS_KEY_U8_OLED_MODE		"OLED_MODE"
#define NVS_KEY_U8_OLED_OFF			"OLED_OFF"

#define NVS_KEY_STR_NTP_SERVER		"NTP_SERVER"
#define NVS_KEY_U16_NTP_MINUTE  	"NTP_MINUTE"

void task_nvs_init(void);
bool task_nvs_read_str(const char *key, char *value, int *len);
void task_nvs_write_str(const char *key, const char *value);
bool task_nvs_read_var(const char *key, nvs_type_t data_type, void *value);
void task_nvs_write_var(const char *key, nvs_type_t data_type, const void *value);

#endif
